package com.javatraining.corejava.homework.laptop;

public class Laptop {
	// below are the different states that are useful to define a Laptop .
	 private String make;
	 
	 private String model;
	
	 private int serialNumber;
		
	 private int year;
				
	 private int boot;
		
	
	 private String software;
		
	 private String sleepMode;
				
	 private boolean powerButtonON=false;
		
	 private String ram;
		
	 private String operatingSystem;
		
	 private String hardDrive;
	
     
	 
	 public String getModel() {
		return model;
	}



	public void setModel(String model) {
		this.model = model;
	}



	public String getMake() {
		return make;
	}



	public void setMake(String make) {
		this.make = make;
	}



	public int getSerialNumber() {
		return serialNumber;
	}



	public void setSerialNumber(int serialNumber) {
		this.serialNumber = serialNumber;
	}



	public int getYear() {
		return year;
	}



	public void setYear(int year) {
		this.year = year;
	}



	public int getBoot() {
		return boot;
	}



	public void setBoot(int boot) {
		this.boot = boot;
	}



	public String getSoftware() {
		return software;
	}



	public void setSoftware(String software) {
		this.software = software;
	}



	public String getSleepMode() {
		return sleepMode;
	}



	public void setSleepMode(String sleepMode) {
		this.sleepMode = sleepMode;
	}



	public boolean isPowerButtonON() {
		return powerButtonON;
	}



	public void setPowerButtonON(boolean powerButtonON) {
		this.powerButtonON = powerButtonON;
	}



	public String getRam() {
		return ram;
	}



	public void setRam(String ram) {
		this.ram = ram;
	}



	public String getOperatingSystem() {
		return operatingSystem;
	}



	public void setOperatingSystem(String operatingSystem) {
		this.operatingSystem = operatingSystem;
	}



	public String getHardDrive() {
		return hardDrive;
	}



	public void setHardDrive(String hardDrive) {
		this.hardDrive = hardDrive;
	}



		
	// below are the 5 different behaviors that a Laptop  exhibits .
		
		
		 public void On(boolean powerButtonON)
		
		 
		 {
			 this.powerButtonON=powerButtonON;
			 
			 if(powerButtonON=true)
			 {
				 System.out.println("Laptop is switched on");
				 System.out.println("----------------------");
			 }		 		 
			 
		 }
		 	
		
		
		 public void start( int boot)
			
		 {
			 this.boot = boot;
			 
			 switch (boot)
			 {
			 case 1: System.out.println("Start the Laptop is in Normal Mode");
			 System.out.println("--------------");
			 break;
			 
			 case 2: System.out.println("Start the Laptop is in Safe Mode");
			 System.out.println("--------------");
			 break;
			 
			 case 3: System.out.println("Start the Laptop with Last Known Configuration");
			 System.out.println("--------------");
			 break;
	
			 
			 default:
			 {
				 System.out.println("Invalid Start Option");
				 System.out.println("---------------------");
			 }
			 
			 }
			 		 
		 }
		 
		 
		 public void runProgram(String software)
		 
		 {  this.software = software;
		 
			 if(software=="Excel")
			 {
				 System.out.println("Opening Excel");
				 System.out.println("--------------");
			 }
			 
			 else if(software=="Word")
			 {
				 
				 System.out.println("Opening Word");
				 System.out.println("--------------");
				 
			 }	 
			 
			 else if(software=="Opening")
			 {
				 
				 System.out.println("Opening Outlook");
				 System.out.println("--------------");
				 
			 }	
			 
			 else
			 {
				 System.out.println(software + " " +"Software not installed");
				 System.out.println("----------------------------------------");
			 }
		 }
		 
		 
		 
		 public void Sleep(String sleepMode)
			
		 {
			 
			 this.sleepMode = sleepMode;
			
			 if(sleepMode == "Hibernate" ||  sleepMode == "Sleep")
			 {
				 System.out.println("Laptop is in Sleep / Hibernate mode");
				 System.out.println("-----------------------------------");
			 }
			 
			 
		 }
		
				
		 
		 public void upgrade(String ram, String operatingSystem, String hardDrive)
		 {
			 this.ram = ram;
			 this.operatingSystem = operatingSystem;
			 this.hardDrive = hardDrive;
			 
			 if(ram=="1 GB" && operatingSystem=="Windows XP" || hardDrive == "80 GB")
			 {
				 System.out.println("Please upgrade your hardware");
				 System.out.println("----------------------------");
			 }
			 else
			 {
				 System.out.println("No upgrade required");
				 System.out.println("--------------------");
			 }
			 
		 }
		 
			
		 public void Off(boolean powerButtonON)
			
		 {
			 
			 this.powerButtonON = powerButtonON;
			
			 if(powerButtonON==false )
			 {
				 System.out.println("Laptop is  switched off");
				 System.out.println("-------------------------");
			 }
		 

		 }
}
